From: Christoph Reiter Date: Sun, 18 Feb 2018 09:34:52 +0000 (+0100) Subject: gtk_init: Fix debug flags handling when a display is already open X-Git-Tag: archive/raspbian/3.24.39-1+rpi1~1^2~65^2~37^2~63^2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=8e540f2f620a68d03a6d40a0d7bc3f8b43f22f92;p=gtk%2B3.0.git gtk_init: Fix debug flags handling when a display is already open In PyGObject gdk_init() is called before gtk_init() and thus there is already a default display open when gtk_init() is called. The code assigning the display to the debug_flags struct gets only called when the default display changes, which never happens when there already is one. As a result GTK_DEBUG=interactive doesn't do anyting with Python apps. This makes it call the change callback in case a display is already there. See https://gitlab.gnome.org/GNOME/pygobject/issues/166 --- diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index 74ce18009d..12b5d6659d 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -762,7 +762,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS display_manager = gdk_display_manager_get (); if (gdk_display_manager_get_default_display (display_manager) != NULL) - _gtk_accessibility_init (); + default_display_notify_cb (display_manager); g_signal_connect (display_manager, "notify::default-display", G_CALLBACK (default_display_notify_cb),